package cn.shujuhai.cms.service;

import cn.shujuhai.cms.domain.SysChannel;
import cn.shujuhai.common.pluging.data.ResultVo;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.Map;

/**
 * @Author: zhangDeZhong
 * @Date: 2024/12/5 12:01
 * @Description: 针对表【sys_channel(栏目表)】的数据库操作Service
 **/
public interface SysChannelService extends IService<SysChannel> {

    List<Map<String, Object>> getParentMenusAsTree();

    ResultVo<?> getChannelList();

    List<Map<String, Object>> buildChannelMenuTree(List<Long> channelIds, String href, String module);

    SysChannel getChannelById(Integer channelId);

    ResultVo<?> updateSaveChannel(SysChannel sysChannel);

    ResultVo<?> addChannel(SysChannel sysChannel);

    ResultVo<?> deleteChannel(Long channelId);

    ResultVo<?> getChannelUrlById(Long channelId);

    ResultVo<?> getTotalViewCount();

    ResultVo<?> getChannelAndArticleViews();

    ResultVo<?> getTemplateCode(Long channelId);

    ResultVo<?> judgeInfoExists(Long channelId);

    void countChannelNum(Map<String, String> body);

    ResultVo<?> viewArticleRanking();

    void exportSysChannel(HttpServletResponse response) throws IOException;

    ResultVo<?> getCountChannel(String date);
}

